package ooday01;

public class Student extends Person{
    String className;
    int studId;
    int a;

    //无参构造器
    Student(){

    }

    //有参构造器
    Student(String name,  int age, String address, String className, int studId){
        super.a = 5; //此处访问的是Person中的 a
        this.a = 5; //此处访问的是Student中的 a

        this.name = name;
        this.age = age;
        this.address = address;
        this.className = className;
        this.studId = studId;
    }

    void study(){
        System.out.println(name+"正在学习");
    }
}
